package com.wang.mapper;

import com.wang.entity.Orders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
* @author Lenovo
* @description 针对表【orders】的数据库操作Mapper
* @createDate 2022-05-01 09:39:17
* @Entity com.wang.entity.Orders
*/
public interface OrdersMapper extends BaseMapper<Orders> {
    @Update("update orders set state = #{state},payment_time = #{paymentTime},alipay_no=#{alipayNo} where no = #{no}")
    int updateState(@Param("no") String no, @Param("state") String state, @Param("paymentTime") String gmtPayment,@Param("alipayNo") String alipayTradeNo);

    @Update("update orders set state = #{state},return_time=#{time} where no=#{no}")
    int updatePayState(@Param("no") String no, @Param("state") String state, String time);

    @Select("select * from orders where no = #{traceNo}")
    Orders getByNo(String traceNo);
}




